A direct-mapped program or data cache, or a program or data cache with limited associativity can incur extra, unnecessary cache misses. These conflict misses are causes when multiple program or data items frequently accessed map to the same location in the cache. These misses are generally unnecessary because the cache is usually big enough to hold the working set of the program. Such conflict cache misses occur only because of the limitations of the mapping policy in the cache. When multiple items map to the same locations in the cache, normal accesses may cause them to repeatedly evict each other even though the cache is big enough to hold all then items. This behavior is known as thrashing.
While conflict misses seem to be only due to the mapping of items into the same locations in the cache, there is a temporal aspect to this problem. Two items that map to the same location in the cache will only generate conflict misses if accesses to them occur close enough in time so that the misses are only due to mapping and not to the limited size of the cache. The latter case is called a capacity cache miss and is not a conflict miss.
The current trend of data processor and external memory speeds will cause the cache miss penalty to grow. Thus this problem will get significantly worse. Thus there is a need to improve cache behavior.
This problem could be mitigated manually. Such manual solution is difficult because it requires understanding of caches and how they operate, the memory reference pattern and its relation to layout. A system programmer could generate and test possible solutions. However, this process generally seems like fumbling in the dark. The system programmer could use feedback from a simulator or emulator to know where the misses occur and perhaps even when they occur. There are known in the art visual tools to aid this process. The solution to this conflict miss problem is still very difficult even when such a visual tool reveals where, when and which conflicts cause cache misses. Often changing the program layout to solve one conflict creates or worsens another conflict. This problem is like pushing on a balloon. Applications with multiple data sets, such as an MPEG-2 decoder, often create different sets of conflicts. Thus initial efforts at system design provide poor out of the box performance